gdk: Always request "flush events" frame clock phase on events
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 26 Jan 2022 14:49:29 +0000 (15:49 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 26 Jan 2022 14:49:29 +0000 (15:49 +0100)
commit2b41e72196ee648ae71f8c8af393d8d8942ea0d4
tree3d7abd6bd3ba57cc23f35cbab567045d18d3cb56
parent2f8eac2c0acca181926749b787748813ca600914
gdk: Always request "flush events" frame clock phase on events

This change is done for 2 reasons:

- The logic to request this phase when compressing scroll events is
  slightly broken. If there are multiple scroll events that are
  coalesced into one, the surface frame clock will not get this request.
  The worst case is having >= 2 scroll events on every frame, as the
  compressed event will be left in the queue, and be further compressed
  on future events.

- Even scroll events aside, this phase is requested in oddly specific
  places that are not enough to cover all events, others do rely on
  unrelated GdkFrameClock activity that happens to flush the events
  as well.

Unify this phase request so it explicitly happens on the arrival of any
event. This ensures that events (compressed or not) will be handled
promptly after arrival.
gdk/gdkevents.c
gdk/gdksurface.c